*********************************************************************;
**** DATA SET NAME:  "&data6A.\HEI.DAT"                                ****;
**** LRECL:   320                                                ****;
**** LRECL INCLUDES 2 POSITIONS FOR CRLF, ASSUMING USE OF PC SAS ****;
*********************************************************************;
FILENAME HEI "&data6A.\HEI.DAT";

    DATA hei;
      INFILE HEI MISSOVER;

      LENGTH
        SEQN      8
        GRAINNS   8
        FRUITNS   8
        VEGETNS   8
        DAIRYNS   8
        MEATNS    8
        LEGUMENS  8
        GRAINHEI  8
        FRUITHEI  8
        VEGETHEI  8
        DAIRYHEI  8
        MEATHEI   8
        FATHEI    8
        SFATHEI   8
        CHOLEHEI  8
        SODIUHEI  8
        VARIEHEI  8
        HEISCORE  8
      ;

      FORMAT
        SEQN     BEST12.
        GRAINNS  7.3
        FRUITNS  7.3
        VEGETNS  7.3
        DAIRYNS  7.3
        MEATNS   7.3
        LEGUMENS 7.3
        GRAINHEI BEST12.
        FRUITHEI BEST12.
        VEGETHEI BEST12.
        DAIRYHEI BEST12.
        MEATHEI  BEST12.
        FATHEI   BEST12.
        SFATHEI  BEST12.
        CHOLEHEI BEST12.
        SODIUHEI BEST12.
        VARIEHEI 7.1
        HEISCORE 7.1
      ;

     INPUT
        SEQN     1-5
        GRAINNS  6-11
        FRUITNS  12-17
        VEGETNS  18-23
        DAIRYNS  24-29
        MEATNS   30-35
        LEGUMENS 36-41
        GRAINHEI 42-46
        FRUITHEI 47-51
        VEGETHEI 52-56
        DAIRYHEI 57-61
        MEATHEI  62-66
        FATHEI   67-71
        SFATHEI  72-76
        CHOLEHEI 77-81
        SODIUHEI 82-86
        VARIEHEI 87-91
        HEISCORE 92-96
     ;

      LABEL
        SEQN     = "Sequence Number"
        GRAINNS  = "Grains, number of servings"
        FRUITNS  = "Fruits, number of servings"
        VEGETNS  = "Vegetables, number of servings"
        DAIRYNS  = "Dairy, number of servings"
        MEATNS   = "Meats, number of servings"
        LEGUMENS = "Legumes, number of servings"
        GRAINHEI = "Grains, HEI score (0-10)"
        FRUITHEI = "Fruits, HEI score (0-10)"
        VEGETHEI = "Vegetables, HEI score (0-10)"
        DAIRYHEI = "Dairy, HEI score (0-10)"
        MEATHEI  = "Meats, HEI score (0-10)"
        FATHEI   = "Fats, HEI score (0-10)"
        SFATHEI  = "Saturated fat, HEI score (0-10)"
        CHOLEHEI = "Cholesterol, HEI score (0-10)"
        SODIUHEI = "Sodium, HEI score (0-10)"
        VARIEHEI = "Variety, HEI score (0-10)"
        HEISCORE = "Healthy Eating Index score (0-100)"
      ;

